<html>
<?php $this->start('content2');
?>
<h2><center>Future Direct Messages</center></h2>
<table>
<tr>
	<th>Direct message text</th>
	<th>Status</th>
	<th>    </th>
</tr>
	<?php foreach($futureDms as $futureDm):?>
	<tr>
		<td><?php echo $futureDm['FutureDm']['messageText']; ?></td>
		<td><?php 
		if($futureDm['FutureDm']['approved']==1) {
			echo 'Approved';
		}
		else echo 'Not Approved yet';
		?></td>
		<?php

			if($priv == 1) {
		?>
		<td>
            <?php echo $this->Form->postLink(
                'Delete',
                array('action' => 'delete', $futureDm['FutureDm']['id']),
                array('confirm' => 'Are you sure you want to delete this ?'));
				?>
				&nbsp;|&nbsp;
        	<?php 
        		if($futureDm['FutureDm']['approved'] == false) {
        			echo $this->Html->link('Approve', array('action' => 'approve', $futureDm['FutureDm']['id']));
        		} else {
        			echo $this->Html->link('Disprove', array('action' => 'approve', $futureDm['FutureDm']['id']));
        		}
    		?>

        </td>
        <?php } ?>
	</tr>
	<?php endforeach; ?>

</table>
<?php $this->end();?>
</html>